package org.bw.bookstore.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 *@program: wisdom_bookstore
 *@description: 图示单品实体类
 *@Author: liuwu
 @Date: 2020-10-20 08:39
 **/
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Entity
@TableName("tb_book_single")
public class TbBookSingle extends BaseEntity implements Serializable {

    /**
     * 图书单品RFID
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 11:40
     **/
    private String rfid;

    /**
     * 图书单品二维码
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 11:40
     **/
    private String qrCode;

    /**
     * 图书售卖状态
     * 0:未售卖、1：已售卖
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 11:40
     **/
    private Integer onSellStatus;

    /**
     * 书籍详情唯一标识
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 13:19
     **/
    private String bookDetailedCode;

    /**
     * 书店唯一标识
     *
     * @Author 孙冬雪
     * @Date 2020/10/23 23:10
     **/
    private String shopCode;

    /**
     * 一个单品是有一个图书详情
     *
     * @Author 孙冬雪
     * @Date 2020/10/21 15:15
     **/
    @TableField(exist = false)
    @Transient
    @ApiModelProperty(hidden = true)
    private TbBookDetailed bookDetailed;

    /**
     * 一个书籍单品属于一个店铺
     *
     * @Author 孙冬雪
     * @Date 2020/10/23 23:11
     **/
    @TableField(exist = false)
    @Transient
    @ApiModelProperty(hidden = true)
    private TbShop shop;
}
